<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<html>
  <head>
  	<link rel="stylesheet" type="text/css" href="<c:url value='/css/Pub.css'/>"></link>
  	<script type="text/javascript">
  		var path = "<c:url value='/'/>";
  	</script>
      <meta http-equiv="pragma" content="no-cache">
      <meta http-equiv="cache-control" content="no-cache">
      <meta http-equiv="expires" content="0">
      <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
      <meta http-equiv="description" content="This is my page">
      <meta charset="utf-8">
      <title>Bootstrap 实例 - 悬停表格</title>
      <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
      <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
      <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
      <style type="text/css">
          a {
              text-decoration:none;
          }
      </style>
  </head>
  <body>
  <table class="table table-hover">
      <caption>订单信息</caption>
      <thead>
      <tr>
          <th>订单名称</th>
          <th>订单结果</th>
      </tr>
      </thead>
      <tbody>
      <tr>
          <td>
              订单编号：
          </td>
          <td>
              <input class="txt"  class="form-control" readonly="readonly" type="text" name="id" id="id" value="${order.id}"/>
          </td>
      </tr>
      <tr>
          <td>
              收货人/地址：
          </td>
          <td>
              <input class="txt"  class="form-control" readonly="readonly" type="text" id="consignee" name="consignee" value="${order.consignee}"/>
          </td>
      </tr>
      <tr style="background:#E0E0E0;">
          <td>
              总金额：
          </td>
          <td>
              <input style="text-align: center;" class="txt"  class="form-control" readonly="readonly" value="${order.amt}元" type="text" name="amt" id="amt"/>
          </td>
      </tr>
      <tr>
          <td>
              支付方式：
          </td>
          <td>
              <c:choose>
                  <c:when test="${order.paytype==1}">
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;货到付款
                  </c:when>
                  <c:otherwise>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;网银转账
                  </c:otherwise>
              </c:choose>
          </td>
      </tr>
      </tbody>
  </table>
  <table class="table table-hover">
      <caption>订单明细</caption>
      <thead>
      <tr>
          <th>ID</th>
          <th>订单ID</th>
          <th>图书ID</th>
          <th>数量</th>
          <th>价格</th>
      </tr>
      </thead>
      <tbody>
      <c:forEach items="${order.orderLines}" var="line">
          <tr >
              <td>
                  <a target="_new" href="${pageContext.request.contextPath}/index_queryBook.action?id=${line.bookid}">
                          ${line.id}
                  </a>
              </td>
              <td>
                      ${line.orderid}
              </td>
              <td>
                      ${line.bookid}
              </td>
              <td>
                      ${line.amt}
              </td>
              <td>
                      ${line.price}
              </td>
          </tr>
      </c:forEach>
      </tbody>
  </table>
  </body>
</html>
